package com.asset.crm.domain;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

@SuppressWarnings("serial")
@Entity
@Table(name="appointment")
public class Appointment implements Serializable {

	private Integer id;
	private Employee salesMan;
	private Contact contactedPerson;
	private String day;
	private Date date; 
	private String time;
	private String confirmationDateExpected;
	private Boolean meetingDone;
	private String meetingDuration;
	private String customerNeed;
	private Boolean demoDone;
	private Boolean offerSubmitted;
	private Boolean discountDone;
	private Boolean compatitorOffer;
	private String replyPeriod;
	private String comment;
	private Boolean dealClosingDone;
	private String dealClosingReason;
	private Boolean nextFollowUp;
	private String followUpType;
	private String followUpDetails;
	private Date followUpDate;
	private Integer parentId;
	private String parentType;
	private Date dateCreated;
	private Date dateModified;
	 
 	@Id
	@GeneratedValue(strategy = GenerationType.SEQUENCE ,generator="appointment_id_seq")
	@SequenceGenerator(name="appointment_id_seq",sequenceName="appointment_id_seq",allocationSize=1)
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	
	@ManyToOne
	@JoinColumn(name="sales_man_id")
	public Employee getSalesMan() {
		return salesMan;
	}
	public void setSalesMan(Employee salesMan) {
		this.salesMan = salesMan;
	}
	
	@ManyToOne
	@JoinColumn(name="contacted_person_id")
	public Contact getContactedPerson() {
		return contactedPerson;
	}
	public void setContactedPerson(Contact contactedPerson) {
		this.contactedPerson = contactedPerson;
	}
	
	@Column(name="day")
	public String getDay() {
		return day;
	}
	public void setDay(String day) {
		this.day = day;
	}
	
	@Column(name="date")
	public Date getDate() {
		return date;
	}
	public void setDate(Date date) {
		this.date = date;
	}
	
	@Column(name="time")
	public String getTime() {
		return time;
	}
	public void setTime(String time) {
		this.time = time;
	}
	
	@Column(name="confirmation_date_expected")
	public String getConfirmationDateExpected() {
		return confirmationDateExpected;
	}
	public void setConfirmationDateExpected(String confirmationDateExpected) {
		this.confirmationDateExpected = confirmationDateExpected;
	}
	
	@Column(name="meeting_done")
	public Boolean getMeetingDone() {
		return meetingDone;
	}
	public void setMeetingDone(Boolean meetingDone) {
		this.meetingDone = meetingDone;
	}
	
	@Column(name="meeting_duration")
	public String getMeetingDuration() {
		return meetingDuration;
	}
	public void setMeetingDuration(String meetingDuration) {
		this.meetingDuration = meetingDuration;
	}
	
	@Column(name="customer_need")
	public String getCustomerNeed() {
		return customerNeed;
	}
	public void setCustomerNeed(String customerNeed) {
		this.customerNeed = customerNeed;
	}
	
	@Column(name="demo_done")
	public Boolean getDemoDone() {
		return demoDone;
	}
	public void setDemoDone(Boolean demoDone) {
		this.demoDone = demoDone;
	}
	
	@Column(name="offer_submitted")
	public Boolean getOfferSubmitted() {
		return offerSubmitted;
	}
	public void setOfferSubmitted(Boolean offerSubmitted) {
		this.offerSubmitted = offerSubmitted;
	}
	
	@Column(name="discount_done")
	public Boolean getDiscountDone() {
		return discountDone;
	}
	public void setDiscountDone(Boolean discountDone) {
		this.discountDone = discountDone;
	}
	
	@Column(name="compatitor_offer")
	public Boolean getCompatitorOffer() {
		return compatitorOffer;
	}
	public void setCompatitorOffer(Boolean compatitorOffer) {
		this.compatitorOffer = compatitorOffer;
	}
	
	@Column(name="reply_period")
	public String getReplyPeriod() {
		return replyPeriod;
	}
	public void setReplyPeriod(String replyPeriod) {
		this.replyPeriod = replyPeriod;
	}
	
	@Column(name="comment")
	public String getComment() {
		return comment;
	}
	public void setComment(String comment) {
		this.comment = comment;
	}
	
	@Column(name="deal_closing_done")
	public Boolean getDealClosingDone() {
		return dealClosingDone;
	}
	public void setDealClosingDone(Boolean dealClosingDone) {
		this.dealClosingDone = dealClosingDone;
	}
	
	@Column(name="deal_closing_reason")
	public String getDealClosingReason() {
		return dealClosingReason;
	}
	public void setDealClosingReason(String dealClosingReason) {
		this.dealClosingReason = dealClosingReason;
	}
	
	@Column(name="next_follow_up")
	public Boolean getNextFollowUp() {
		return nextFollowUp;
	}
	public void setNextFollowUp(Boolean nextFollowUp) {
		this.nextFollowUp = nextFollowUp;
	}
	
	@Column(name="follow_up_type")
	public String getFollowUpType() {
		return followUpType;
	}
	public void setFollowUpType(String followUpType) {
		this.followUpType = followUpType;
	}
	
	@Column(name="follow_up_details")
	public String getFollowUpDetails() {
		return followUpDetails;
	}
	public void setFollowUpDetails(String followUpDetails) {
		this.followUpDetails = followUpDetails;
	}
	
	@Column(name="follow_up_date")
	public Date getFollowUpDate() {
		return followUpDate;
	}
	public void setFollowUpDate(Date followUpDate) {
		this.followUpDate = followUpDate;
	}
	
	@Column(name="parent_id")
	public Integer getParentId() {
		return parentId;
	}
	public void setParentId(Integer parentId) {
		this.parentId = parentId;
	}

	@Column(name="parent_type")
	public String getParentType() {
		return parentType;
	}
	public void setParentType(String parentType) {
		this.parentType = parentType;
	}
	/**
	 * @return the dateCreated
	 */
	@Temporal(value = TemporalType.TIMESTAMP)
	@Column(name="date_created")
	public Date getDateCreated() {
		return dateCreated;
	}

	/**
	 * @param dateCreated the dateCreated to set
	 */
	public void setDateCreated(Date dateCreated) {
		this.dateCreated = dateCreated;
	}
	/**
	 * @return the dateModified
	 */
	@Temporal(value = TemporalType.TIMESTAMP)
	@Column(name="date_modified")
	public Date getDateModified() {
		return dateModified;
	}

	/**
	 * @param dateModified the dateModified to set
	 */
	public void setDateModified(Date dateModified) {
		this.dateModified = dateModified;
	}




}
